const express = require('express')
const cors = require('cors')
let app = express()
let users = [{ id: 1, name: 'liangcuncun1' }, { id: 2, name: 'liangcuncun2' }]
let corsOptions = {
  origin: 'http://localhost:9090',
  optionsSuccessStatus: 200
}
app.use(cors(corsOptions));
app.get('/api/user', function (req, res) {
  res.json(users)
})

app.listen(5000)